package com.dq.demo;


import javax.swing.ImageIcon;

public class Smallblock {	//小方块类，俄罗斯方块的最小的单位。小方块组成大方块
	
		private int row,col;														//小方块应该有坐标，row行，col列；
		private ImageIcon sbimage;													//小方块的图片
		
		public Smallblock(int row, int col, ImageIcon Smallblockimage) {			//设置小方块的行列坐标和图片
			super();
			this.row=row;
			this.col=col;
			this.sbimage=Smallblockimage;
		}

		public int getRow() {									//获得行坐标
			return row;
		}
		
		public void setRow(int row) {							//设置行坐标
			this.row = row;
		}
		
		public int getCol() {									//获得列坐标
			return col;
		}
		
		public void setCol(int col) {							//设置列坐标
			this.col = col;
		}
		
		public ImageIcon getsbImage() {							//获得图片
			return sbimage;
		}
		
		public void left(){										//小方块向左移动
		 	col--;
		 }
		
		public void rigth(){									//小方块向右移动
		 	col++;
		 }
		
		public void drop(){										//小方块向下移动
		 	row++;
		 }
		

}
